.class public Lcom/nemustech/regina/WorkspaceViewGroup;
.super Landroid/view/ViewGroup;
.source "WorkspaceViewGroup.java"


# instance fields
.field mPostScrollActor:Ljava/lang/Runnable;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 13
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/nemustech/regina/WorkspaceViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 14
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 17
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/nemustech/regina/WorkspaceViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 18
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    .line 21
    invoke-direct {p0, p1, p2, p3}, Landroid/view/ViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 22
    return-void
.end method


# virtual methods
.method protected onLayout(ZIIII)V
    .locals 7
    .parameter "changed"
    .parameter "left"
    .parameter "top"
    .parameter "right"
    .parameter "bottom"

    .prologue
    .line 26
    const/4 v5, 0x0

    invoke-virtual {p0}, Lcom/nemustech/regina/WorkspaceViewGroup;->getMeasuredWidth()I

    move-result v6

    sub-int v1, v5, v6

    .line 28
    .local v1, childLeft:I
    invoke-virtual {p0}, Lcom/nemustech/regina/WorkspaceViewGroup;->getChildCount()I

    move-result v3

    .line 29
    .local v3, count:I
    const/4 v4, 0x0

    .local v4, i:I
    :goto_0
    if-ge v4, v3, :cond_1

    .line 30
    invoke-virtual {p0, v4}, Lcom/nemustech/regina/WorkspaceViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 31
    .local v0, child:Landroid/view/View;
    invoke-virtual {v0}, Landroid/view/View;->getVisibility()I

    move-result v5

    const/16 v6, 0x8

    if-eq v5, v6, :cond_0

    .line 32
    invoke-virtual {v0}, Landroid/view/View;->getMeasuredWidth()I

    move-result v2

    .line 33
    .local v2, childWidth:I
    add-int v5, v1, v2

    invoke-virtual {v0, v1, p3, v5, p5}, Landroid/view/View;->layout(IIII)V

    .line 38
    add-int/2addr v1, v2

    .line 29
    .end local v2           #childWidth:I
    :cond_0
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 41
    .end local v0           #child:Landroid/view/View;
    :cond_1
    return-void
.end method

.method protected onMeasure(II)V
    .locals 6
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    const/high16 v4, 0x4000

    .line 63
    invoke-super {p0, p1, p2}, Landroid/view/ViewGroup;->onMeasure(II)V

    .line 66
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v3

    .line 67
    .local v3, widthMode:I
    if-eq v3, v4, :cond_0

    .line 68
    new-instance v4, Ljava/lang/IllegalStateException;

    const-string v5, "Workspace can only be used in EXACTLY mode."

    invoke-direct {v4, v5}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v4

    .line 71
    :cond_0
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v1

    .line 72
    .local v1, heightMode:I
    if-eq v1, v4, :cond_1

    .line 73
    new-instance v4, Ljava/lang/IllegalStateException;

    const-string v5, "Workspace can only be used in EXACTLY mode."

    invoke-direct {v4, v5}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v4

    .line 77
    :cond_1
    invoke-virtual {p0}, Lcom/nemustech/regina/WorkspaceViewGroup;->getChildCount()I

    move-result v0

    .line 78
    .local v0, count:I
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    if-ge v2, v0, :cond_2

    .line 79
    invoke-virtual {p0, v2}, Lcom/nemustech/regina/WorkspaceViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v4

    invoke-virtual {v4, p1, p2}, Landroid/view/View;->measure(II)V

    .line 78
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 86
    :cond_2
    return-void
.end method

.method protected onScrollChanged(IIII)V
    .locals 3
    .parameter "l"
    .parameter "t"
    .parameter "oldl"
    .parameter "oldt"

    .prologue
    .line 52
    invoke-super {p0, p1, p2, p3, p4}, Landroid/view/ViewGroup;->onScrollChanged(IIII)V

    .line 53
    const-string v0, "WorkspaceGroupView"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "onScrollChanged l:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " t:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " ol:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " ot:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 54
    iget-object v0, p0, Lcom/nemustech/regina/WorkspaceViewGroup;->mPostScrollActor:Ljava/lang/Runnable;

    if-eqz v0, :cond_0

    .line 55
    const-string v0, "WorkspaceGroupView"

    const-string v1, "Post scroll actor found and triggered."

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 56
    iget-object v0, p0, Lcom/nemustech/regina/WorkspaceViewGroup;->mPostScrollActor:Ljava/lang/Runnable;

    invoke-interface {v0}, Ljava/lang/Runnable;->run()V

    .line 58
    :cond_0
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/nemustech/regina/WorkspaceViewGroup;->mPostScrollActor:Ljava/lang/Runnable;

    .line 59
    return-void
.end method

.method public setPostScrollActor(Ljava/lang/Runnable;)V
    .locals 0
    .parameter "r"

    .prologue
    .line 46
    iput-object p1, p0, Lcom/nemustech/regina/WorkspaceViewGroup;->mPostScrollActor:Ljava/lang/Runnable;

    .line 47
    return-void
.end method
